#ifndef __COMMON_UTIL_H_
#define __COMMON_UTIL_H_

#include <stdint.h>
#include <stddef.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h> 
#include <dirent.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>


#ifdef __cpluplus
extern "C"
{
#endif


#include <mtd/mtd-abi.h>
#include <linux/types.h>
 

typedef struct erase_info_user erase_info_t;
 



int common_util_get_block_size(char *dev_node);
int common_util_is_bad_block(uint64_t address, uint32_t erase_block_size);
int common_util_erase_partition(char *dev_node);
int common_util_write_file_to_partition(char *dev_node, char *image_file);


#ifdef __cpluplus
}
#endif
#endif